package com.liuhengjia.springbootmybatis.controller;

import com.liuhengjia.springbootmybatis.pojo.User;
import com.liuhengjia.springbootmybatis.service.UserService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("/findById")
    public User findById(Integer id) {
        return userService.selectById(id);
    }
}
